package org.huawei260.TiKu.ODsuanfa;

import java.util.Arrays;
import java.util.Scanner;
public class A_2023A_2651__单调栈删除重复数字后的最大数字 {

//	public class Main {
		public static void main(String[] args) {
			Scanner sc = new Scanner(System.in);
			String[] arr = sc.next().split(",");
			Arrays.sort(arr, (a, b) -> (b + a).compareTo(a + b));

			StringBuilder sb = new StringBuilder();
			for (String s : arr) sb.append(s);
			System.out.println(sb);
		}
//	}
}
